package com.zxt.service.impl;

import com.zxt.annotation.DataSource;
import com.zxt.enums.DataSourceTypeEnums;
import com.zxt.manager.SysUserManager;
import com.zxt.security.bean.SysUser;
import com.zxt.service.SysUserService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@AllArgsConstructor
public class SysUserServiceImpl implements SysUserService {

    private final SysUserManager sysUserManager;

    @Override
    @DataSource(DataSourceTypeEnums.SLAVE)
    public List<SysUser> list() {
        return sysUserManager.list();
    }
}
